$OpenBSD: patch-twm_c,v 1.1 2017/05/05 22:11:08 naddy Exp $

Index: twm.c
--- twm.c.orig
+++ twm.c
@@ -141,6 +141,7 @@
 #include <stdio.h>
 #include <signal.h>
 #include <fcntl.h>
+#include <unistd.h>
 #include <sys/wait.h>
 #include "twm.h"
 #include "add_window.h"
@@ -155,11 +156,14 @@
 #include "iconmgr.h"
 #include <X11/Xproto.h>
 #include <X11/Xatom.h>
+#include <X11/Xmu/Error.h>
 #include <X11/bitmaps/root_weave>
 #include "vdt.h"
 #define XK_LATIN1
 #include <X11/keysymdef.h>
 
+static void InitVariables();
+
 Display *dpy;			/* which display are we talking to */
 char *display_name = NULL;	/* JMO 2/13/90 for m4 */
 /* Hack so that m4 isn't necessarily run */
@@ -185,6 +189,7 @@ static int RedirectError;	/* TRUE ==> another window m
 static int CatchRedirectError();	/* for settting RedirectError */
 static int TwmErrorHandler();	/* for everything else */
 static void SetRootProperties();	/* leave note on root window */
+static void InternUsefulAtoms();
 char Info[INFO_LINES][INFO_SIZE];		/* info strings to print */
 int InfoLines;
 char *InitFile = NULL;
@@ -238,7 +243,7 @@ extern void assign_var_savecolor();
  ***********************************************************************
  */
 
-main(argc, argv, environ)
+int main(argc, argv, environ)
     int argc;
     char **argv;
     char **environ;
@@ -827,6 +832,7 @@ ChildExitCleanup()
  ***********************************************************************
  */
 
+static void
 InitVariables()
 {
     FreeList(&Scr->BorderColorL);
@@ -1020,6 +1026,7 @@ CreateFonts ()
 }
 
 
+void
 RestoreWithdrawnLocation (tmp)
     TwmWindow *tmp;
 {
@@ -1227,6 +1234,7 @@ Atom _XA_TWM_RESTART;   /* RESTART */
 Atom _XA_TWM_PROCESS;   /* used to record where twm is */
 Atom _XA_TWM_MACHINE;
 
+static void
 InternUsefulAtoms ()
 {
     /* 
